package com.lidy.tankbattle.tankgame2.tank;

import com.lidy.tankbattle.tankgame2.constant.TankPriorities;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalTime;

/**
 * @author lidy
 * @version V2.0
 * @classname Hero
 * @description 我的坦克
 * @date 2022/5/28 15:28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Hero extends Tank {

    public Hero(int x, int y, int width, int height, int direction, int number, int bloodVolume, LocalTime createdTime, Boolean invincible) {
        super(x, y, width, height, TankPriorities.MY_TANK_TYPE, direction, number, bloodVolume, createdTime, invincible);
    }

    public static Hero getHero(boolean invincible) {
        return new Hero(TankPriorities.MY_TANK_INIT_LOCATION_X, TankPriorities.MY_TANK_INIT_LOCATION_Y, TankPriorities.MY_TANK_WIDTH,
                TankPriorities.MY_TANK_HEIGHT, TankPriorities.MY_TANK_INIT_DIRECTION, TankPriorities.MY_TANK_NUMBER, TankPriorities.MY_TANK_INIT_BLOOD_VOLUME,
                LocalTime.now(), invincible);
    }

}
